<?php
	include("includes/secure.php");
	include("includes/config.php");
	include("includes/class/parameter.class.php");
	
	$parameter = new Parameter(); 

	$param_code = 1;
	
	$data = $parameter->getParameterData($param_code);
			
	if(isset($_POST['edit']) && $_POST['edit'] == 1)
	{
		$new_data->param_code				= 1;
		$new_data->param_salary				= $_POST['param_salary'];
		$new_data->param_aporte   			= $_POST['param_aporte'];
		$new_data->param_iva   				= $_POST['param_iva'];
		$new_data->param_periodo 			= cambiarFormatoFecha($_POST['param_periodo'],2);
		$new_data->param_transporte 		= mysql_real_escape_string($_POST['param_transporte']);	
		$new_data->param_contribuciones 	= mysql_real_escape_string($_POST['param_contribuciones']);	
		$new_data->param_description		= mysql_real_escape_string($_POST['param_description']);	


		if($parameter->updateParameter($new_data))
			echo "<script>alert('Los parametros fueron Actualizados..!!!')</script>";
		else
			echo "<script>alert('no pudo ser actualizados los parametros... lo siento..!!!')</script>";	
		
		echo '<script>window.location.href = "listUtilities.php"</script>';	
}


?>